package com.ssc.manager.admin.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssc.manager.admin.dao.IUserAccountDao;
import com.ssc.manager.admin.entity.db.UserAccount;
import com.ssc.manager.admin.service.IUserAccountService;
import com.ssc.manager.common.base.service.BaseService;
import com.ssc.manager.common.system.SystemData;


@Service
public class UserAccountService extends BaseService<UserAccount> implements IUserAccountService {
	private Logger log = Logger.getLogger(UserAccountService.class);
	
	@Autowired
	private IUserAccountDao userAccount;
	
	@Override
	public UserAccount findUserAccount(String userid) {
		UserAccount user = SystemData.findUserAccount(userid);
		if(null == user)
		{
			user = userAccount.selectByPrimaryKey(userid);
			SystemData.addUserAccount(user);
		}
		return user;
	}

}
